﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.Infrastructure.Common;
using Zocono.WCS.Domain.BytesMapObjectDomain;
using Zocono.WCS.Infrastructure.ApllicationDto;
using Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage;

namespace Zocono.WCS.Application.AppConfigureManage
{
    public class BytesMapObjectInfoApp
    {
        private readonly IMapper _Mapper;
        private readonly IBytesMapObjectInfoService _BytesMapObjectInfoservice;


        public BytesMapObjectInfoApp(IMapper mapper, IBytesMapObjectInfoService BytesMapObjectInfoservice)
        {
            _Mapper = mapper;
            _BytesMapObjectInfoservice = BytesMapObjectInfoservice;
        }

        public async Task<long> AddBytesMapObjectInfoAsync(BytesMapObjectInfoDto BytesMapObjectInfoDto)
        {
            BytesMapObjectInfoDto.ObjectIsNullOrEmpty();//数据非空验证
            return await _BytesMapObjectInfoservice.AddBytesMapObjectInfoAsync(BytesMapObjectInfoDto);
        }

        public async Task<bool> DeleteBytesMapObjectInfoAsync(long ID)
        {
            return await _BytesMapObjectInfoservice.DeleteBytesMapObjectInfoAsync(ID);
        }

        public async Task<bool> UpdateBytesMapObjectInfoAsync(BytesMapObjectInfoDto BytesMapObjectInfoDto)
        {
            BytesMapObjectInfoDto.ObjectIsNullOrEmpty();
            return await _BytesMapObjectInfoservice.UpdateBytesMapObjectInfoAsync(BytesMapObjectInfoDto);
        }

        public async Task<PageDto<BytesMapObjectInfoDto>> GetBytesMapObjectInfoAsync(QueryBytesMapObjectInfoDto queryBytesMapObjectInfoDto)
        {
            return await _BytesMapObjectInfoservice.GetBytesMapObjectInfoAsync(queryBytesMapObjectInfoDto);
        }

        public async Task<BytesMapObjectInfoDto> GetBytesMapObjectInfoByIDAsync(long ID)
        {
            return await _BytesMapObjectInfoservice.GetBytesMapObjectInfoByIDAsync(ID);
        }
    }
}
